#!/bin/bash

usage()
{
        echo "basename $0" [-a] [-b] args
        exit 0
}

while getopts a:b: options 
do
        case $options in
                a)      echo "you enter -a as an option"
			echo "\$OPTARG is $OPTARG";;
                b)      echo "you enter -b as an option"
                        echo "\$OPTARG is $OPTARG";;
                \?)     usage;;
        esac
done
echo "$OPTIND"
